﻿using KinonekoSoftware.Foundation.UI.Converters;

namespace KinonekoSoftware.Studio.Resources.Converters
{
    public sealed class ChineseZodiacColorConverter : ConverterBase
    {

        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is not ChineseZodiac cz)
            {
                cz = ChineseZodiac.Rat;
            }

            var color = cz switch
            {
                 ChineseZodiac.Rat => "#923a61",
                 ChineseZodiac.Ox => "#3d5e8f",
                 ChineseZodiac.Tiger => "#d4eded",
                 ChineseZodiac.Rabbit => "#ae5e52",
                 ChineseZodiac.Loong => "#82cee5",
                 ChineseZodiac.Snake => "#accf78",
                 ChineseZodiac.Horse => "#fff31f",
                 ChineseZodiac.Sheep => "#ec661f",
                 ChineseZodiac.Monkey => "#f8c6a9",
                 ChineseZodiac.Rooster => "#dc8a00",
                 ChineseZodiac.Dog => "#038355",
                 ChineseZodiac.Pig => "#b4a5ca",
                _ => "#923a61",
            };

            return MediaFactory.ToSolidColorBrush(color);
        }
    }
}